unit AboutFrm;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  commonetypes,LCLIntf;

type

  { TAboutForm }

  TAboutForm = class(TForm)
    btOk: TButton;
    lbAppDesc: TLabel;
    lbAppDocCaption: TLabel;
    lbAppDocUrl: TLabel;
    lbAppIssuseCaption: TLabel;
    lbAppIssuseURL: TLabel;
    lbAppName: TLabel;
    lbCopyR: TLabel;
    lbLicCaption: TLabel;
    lbLicUrl: TLabel;
    lbProgectUrlCaption: TLabel;
    lbProjectUrl: TLabel;
    lbVersion: TLabel;
    procedure btOkClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure lbAppDocCaptionClick(Sender: TObject);
    procedure lbLicUrlMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure lbLicUrlMouseEnter(Sender: TObject);
    procedure lbLicUrlMouseLeave(Sender: TObject);
    procedure lbLicUrlMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    procedure lbVersionClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;
  function GetVersionString: string;

var
  AboutForm: TAboutForm;

implementation
function GetVersionString: string;
begin
  Result:=poProjectVersionStr;
end;

{ TAboutForm }

procedure TAboutForm.FormCreate(Sender: TObject);
begin
  lbVersion.Caption:=GetVersionString;
  lbAppName.Caption:=poAppName;
  lbAppDesc.Caption:=poAppDesc;
  lbCopyR.Caption:=poCopyrString;
  lbLicCaption.Caption:=poLicString;
  lbLicUrl.Caption:=poLicUrl;
  lbProgectUrlCaption.Caption:=poProjectUrlCaption;
  lbProjectUrl.Caption:=poProjectUrl;
  lbAppIssuseURL.Caption:=poProjectIssuseUrl;
  lbAppIssuseCaption.Caption:=poProjectIssuseCaption;
  lbAppDocCaption.Caption:=poAppDocCaption;
  lbAppDocUrl.Caption:=poAppDocURL;
end;

procedure TAboutForm.lbAppDocCaptionClick(Sender: TObject);
begin

end;

procedure TAboutForm.lbLicUrlMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
   OpenURL(TLabel(Sender).Caption);
end;

procedure TAboutForm.lbLicUrlMouseEnter(Sender: TObject);
begin
   TLabel(Sender).Font.Style := [fsUnderLine];
  TLabel(Sender).Font.Color := clRed;
  TLabel(Sender).Cursor := crHandPoint;
end;

procedure TAboutForm.lbLicUrlMouseLeave(Sender: TObject);
begin
  TLabel(Sender).Font.Style := [];
  TLabel(Sender).Font.Color := clBlue;
  TLabel(Sender).Cursor := crDefault;
end;

procedure TAboutForm.lbLicUrlMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin

end;

procedure TAboutForm.lbVersionClick(Sender: TObject);
begin

end;

procedure TAboutForm.btOkClick(Sender: TObject);
begin
  Close;
end;

{$R *.lfm}

end.

